package com.example.vp.exception;

import com.common.domain.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

//@RestController
@ControllerAdvice
public class ExceptionController {

    @ExceptionHandler(CustomException.class)
    public R handleException(CustomException e) {
        return R.error().msg(e.getMessage());
    }

}
